#ifndef __LIST_LIST_H__
#define __LIST_LIST_H__

#include <stdio.h>
#include<stdlib.h>
#include<string.h>
//数据域
struct datazone
{
    //数据
    int data;
};

struct link_list
{
    struct datazone data;
    struct link_list *next;
};


//创建头节点
 struct link_list* CreateList(void);

 //头插法,失败返回-1 成功返回0
 int insert_to_head(struct link_list *head,struct datazone datas);
//尾插法,失败返回-1 成功返回0
 int insert_to_end(struct link_list *head,struct datazone datas);
//从头提取数据
struct datazone get_data_in_head(struct link_list *head,struct datazone datas);
//从尾提取数据
struct datazone get_data_in_end(struct link_list *head,struct datazone datas);
//删除特定节点
//int del_designate_node();
//删除第一节点
int del_first_node(struct link_list *head);
//删除最后一个节点
int del_end_node(struct link_list *head);

//释放整个链表
int link_list_free(struct link_list *head);

 #endif
